html {
    font-size: 1em;
    font-family: "微软雅黑";
    background: #544a7d;  /* fallback for old browsers */
    background: -webkit-linear-gradient(to right, #ffd452, #544a7d);  /* Chrome 10-25, Safari 5.1-6 */
    background: linear-gradient(to right, #ffd452, #544a7d); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}

body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/*通用窗口CSS*/
.window {
    color : #444;
    position: absolute;
    display : table;
    border : 1px solid gray;
    background-color: rgb(255, 255, 255, 0.8);
    box-shadow: 0 0 10px #777;
}

.window-title {
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin : 5px;
    margin-bottom: 0;
    border : 1px solid #AAA4A4;
    border-bottom: none;
    height : 25px;
    user-select:none;
    -webkit-user-select: none;
    background-color: #FFF;
}

.window-title-left-span{
    display: flex;
    cursor: move;
    font-size: 0.8em;
    flex-grow: 1;
    padding-left: 5px;
}

.window-title-right-icon{
    margin-right: 4px;
}

.window-title-right-icon .point3{
    box-sizing: border-box;
    display: table-cell;
    width : 18px;
    height: 14px;
    background-color: rgb(238, 158, 165);
    box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.459);
}

.window-title-right-icon .point3:active{
    box-shadow: none;
}

.window-title-right-icon .point3:hover{
    background-color: rgb(235, 79, 92);
}

.window-container {
    box-sizing: border-box;
    position: relative;
    display: table;
    margin : 5px;
    margin-top : 0;
    border : 1px solid #AAA4A4;
    background-color: #F8F4F4;
}

/*-----------设置按钮----------------*/

#minesweeper {
    user-select:none;
    -webkit-user-select: none;
    top: 3em;
}

/*---------------设置按钮和选项----------------------*/

#opt{
    display: block;
    position: absolute;
    left : 3px;
    border-radius : 3px;
    height: 19px;
    width : 40px;
}

#opt:hover{
    background-color: rgb(0, 0, 0, 0.1);
}

.opt-icon{
    display: flex;
    align-items: center;
    position: absolute;
    left: 7px;
    top: 3px;
    width: 25px;
}

#opt-list{
    position: relative;
    color : #333;
    display: none;
    top : 0;
    left: 0;
    z-index: 11;
}

#opt-list ul{
    padding: 3px 4px 3px 5px;
    width : 4.5em;
    background-color: #F5F5F5;
    box-shadow: -1px 0 2px #555, 1px 2px 3px #555;
}

#opt-list ul li{
    position: relative;
    list-style: none;
    text-align: left;
    cursor: default;
    margin: 3px 0;
    padding-left: 2px;
}

#opt-list li:hover{
    background-color: skyblue;
}

#opt-list ul li:hover ul{
    display: block;
}

#opt-list ul ul {
    z-index: 12;
    border : 1px solid gray;
    position: absolute;
    list-style: none;
    width : 4.5em;
    top : -1px;
    left : 4.4em;
    background-color: #F5F5F5;
    box-shadow: -1px 0 5px #999, 1px 1px 8px #555;
}

#opt-list ul li>ul{
    display: none;
}

.spot{
    display: inline-block;
    position: absolute;
}

.spot:before{
    content: "";
    position: absolute;
    border-left: 1px solid gray;
    height: 1px;
    left: 25px;
    top : 6px;
    box-shadow: 1px 1px gray,2px 2px gray,3px 3px gray,4px 4px gray,
    3px 5px gray, 2px 6px gray, 1px 7px gray, 0px 8px gray;
}

/*---------------------顶部信息栏---------------------*/

#topTools {
    display: flex;
    flex-grow: 1;
    justify-content: space-around;
    text-align: center;
    margin: 20px auto 10px auto;
}

#topTools .toolBox{
    font-size: 0.9em;
    color : #999;
}

#topTools #timer, #topTools #mineNum{
    color : #555;
    font-size: 1.1em;
    text-shadow: 1px 1px 2px gray;
    text-align: center;
    border : 1px solid #eee;
    display: inline-block;
    width : 48px;
    border-radius: 3px;
    background-color: rgba(201, 206, 211, 0.7);
    box-shadow: inset 1px 1px 1px #AAA4A4;
}

/***************格子区域*******************/

#main{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

#topbar{
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    margin-top: 3px;
    padding: 5px 10px;
    width: 360px;
    height: 25px;
    background-color: transparent;
    border: 2px solid rgb(212, 212, 212);
    box-shadow: 0 0 3px gray;
}

.timer{
    display: flex;
    align-items: stretch;
    width: 75px;
}

.timer div{
    display: flex;
    margin-left: 5px;
    align-items: center;
    background-color: rgb(0, 0, 0, 0.1);
}

.timer span{
    width: 45px;
    text-align: center;
}

.bomb{
    display: flex;
    align-items: stretch;
    width: 75px;
}

.restart{
    display: flex;
    align-items: center;
    cursor: pointer;
    width: 20px;
    padding: 1px 10px;
    border: 1px solid rgb(0, 0, 0, 0.1);
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}

.restart:hover{
    background-color: rgb(255, 255, 255, 0.2);
}

.restart:active{
    box-shadow: none;
    background: none;
}

.bomb div{
    display: flex;
    margin-right: 5px;
    align-items: center;
    background-color: rgb(0, 0, 0, 0.1);
}

.bomb span{
    width: 45px;
    text-align: center;
}

#main{
    margin: 0;
    padding: 0;
    width: 100%;
}

#desk-sd{
    z-index: -1;
    transition: width 0.1s, height 0.1s;
    position: absolute;
    border: 3px dashed;
    border-color: transparent;
    background-color:rgba(255, 255, 255, 0.2);
}

#desk-border{
    display: flex;
    flex: 1 1;
    width: 100%;
    justify-content: center;
    align-items: center;
    position: relative;
}

#desk{
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
}

#desk>div {
    display: flex;
    width: 100%;
    height: 100%;
}

#desk>div>div{
    flex: 1 1 auto;
}

#desk>div>div:first-child{
    border-left: 1px solid #444;
}

#desk>div:last-child{
    border-bottom: 1px solid #444;
}

/**默认的尺寸元素**/

/********************弹出窗口********************/

#games-win-window {
    position: absolute;
    display: none;
    z-index: 100;
}

#games-win-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 210px;
    height: 140px;
}

#games-win-content span{
    color: rgb(128, 185, 13);
    font-size: 2.6em;
    text-shadow: 5px 5px #ddd;
}

#games-lost-window {
    position: absolute;
    display: none;
    z-index: 100;
}

#games-lost-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 210px;
    height: 140px;
}

#games-lost-content span:first-child {
    color: rgb(139, 110, 29);
    font-size: 2.6em;
    text-shadow: 5px 5px #ddd;
}

#games-lost-content span:last-child {
    font-size: 1.25em;
}

/****************信息统计***********************/

#games-info-window{
    display: none;
    z-index: 100;
}

#contentBox {
    z-index: 100;
    font-size: 0.8rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-content: center;
    width : 370px;
    margin: 18px;
    box-shadow: 0 0 3px gray;
}

.info-top-label {
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.info-top-label span{
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 33.3333%;
    cursor: default;
    height: 25px;
}

.info-top-label span:nth-child(2) {
    border-left: 1px solid #999;
    border-right: 1px solid #999;
}

#contentBox #threeInfo{
    display: flex;
    width : 100%;
    background-color: white;
    border-top: 1px solid #999;
    height: 180px;
}

#contentBox #threeInfo #win5,
#contentBox #threeInfo #win5info {
    position: relative;
    display: flex;
    width : 50%;
    justify-content: center;
    align-items: center;
}

#contentBox #threeInfo #win5 span{
    z-index: 21;
    color : #888;
    position: absolute;
    display: inline-block;
    padding: 0 3px;
    left: 63px;
    top : 23px;
    background-color: white;
}

#contentBox #threeInfo #win5 ul,
#contentBox #threeInfo #win5info ul
{
    padding-left: 0;
    width : 140px;
}

#contentBox #threeInfo #win5info ul {
    margin-left: 50px;
}

#contentBox #threeInfo #win5 ul{
    width : 123px;
    height: 115px;
    padding: 0 0 0 5px;
    border : 1px solid #AAA;
    border-radius: 5px;
}

#contentBox #threeInfo #win5 ul li,
#contentBox #threeInfo #win5info ul li
{
    list-style: none;
    margin : 5px 0;
}

#games-custom-window{
    display: none;
    z-index: 100;
}

.custom{
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 280px;
    margin: 25px 25px 0 25px;
    padding: 20px;
    background-color: #fff;
    border: 1px solid rgb(182, 182, 182);
    box-shadow: 0 0 2px rgb(216, 216, 216);
}

.custom div{
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
}

.custom-tips{
    font-size: 0.8em;
    color: #999;
    margin-left: 25px;
}

.custom input{
    width: 60px;
}

.custom-bt-box{
    text-align: center;
    margin: 35px 0 15px 0;
}

.custom-bt-box button{
    display: inline-block;
    width: 3.8em;
}

.custom-bt-box button:last-child{
    margin-left: 0.5em;
    font-weight: bold;
    color: rgb(243, 150, 10);
}

.reset-game-data{
    text-align: center;
    margin-bottom: 15px;
}

.reset-game-data button{
    display: inline-block;
    width : 3.8em;
}

.reset-game-data button:last-child{
    margin-left: 0.5em;
    font-weight: bold;
    color: red;
}

.restart-bt-box{
    display: flex;
    margin-bottom: 8px;
    justify-content: center;
}

.restart-bt-box button:first-child{
    color: orange;
    font-weight: bold;
    margin-right: 4px;
}

/* --------------关于游戏-------------*/

#about-games-window{
    position: absolute;
    z-index: 101;
    font-size: 0.8em;
    display: none;
}

#about-games-content{
    padding: 1em;
    width: 420px;
    max-height: 525px;
    overflow: auto;
}

#about-games-content .author-img{
    text-align: center;
}

#about-games-content img{
    width: 100%;
    box-shadow: 0 0 3px #777;
}

/************** hover ****************/

.c-hover{
    filter: brightness(1.2);
    -webkit-filter: brightness(1.2);
}


.fullscreen-select{
    position: absolute;
    display: flex;
    color: #222;
    padding: 1px;
    top: 3px;
    right: 5px;
    border: 1px solid rgb(138, 138, 138);
}

.fullscreen-select button{
    display: inline-block;
    padding: 0;
    margin: 0;
    font-size: 0.95em;
    text-align: center;
    width: 3em;
    height: 1.6em;
    cursor: pointer;
    border: none;
    border-radius: 0;
    outline: none;
}

.fullscreen-select button:nth-child(1) {
    background-color: rgba(255, 255, 255, 0.3);
}

.fullscreen-select button:nth-child(1):hover {
    background-color: rgb(74, 199, 74);
}

.fullscreen-select button:nth-child(2) {
    background-color: rgba(255, 255, 255, 0.1);
}

.fullscreen-select button:nth-child(2):hover {
    background-color: #cd5c5c;
}

.tips{
    position: absolute;
    top: 5px;
    left: 60px;
    padding: 4px 5px;
    border: 1px solid #505050;
    box-shadow: 6px 6px 2px rgba(90, 90, 90, 0.5);
}

.tips span{
    cursor: pointer;
}

.tips span:hover{
    background-color: green;
}